package com.xbongbong.paas.service;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.pojo.dto.ConditionGetDTO;
import com.xbongbong.paas.pojo.dto.ConditionListDTO;
import com.xbongbong.paas.pojo.dto.NodeValidConditionDTO;
import com.xbongbong.paas.pojo.dto.RelationClueConditionListDTO;
import com.xbongbong.paas.pojo.vo.ConditionGetVO;
import com.xbongbong.paas.pojo.vo.ConditionListVO;
import com.xbongbong.paas.pojo.vo.NodeValidConditionVO;
import com.xbongbong.paas.toolbox.exception.XbbException;

/**
 * @author: wufeng
 * @date: 2018/9/5 20:36
 * @desrcption:
 */
public interface ConditionService {
    /**
     * 条件列表
     * @param conditionGetDTO
     * @return
     * @throws XbbException
     */
    ConditionGetVO get(ConditionGetDTO conditionGetDTO) throws XbbException;


    /**
     * 节点校验条件
     * @param nodeValidConditionDTO
     * @return
     * @throws XbbException
     */
    NodeValidConditionVO nodeValidCondition(NodeValidConditionDTO nodeValidConditionDTO) throws XbbException;

    /**
     * 获取流转条件
     * @param conditionListDTO
     * @return
     * @throws XbbException
     */
    ConditionListVO list(ConditionListDTO conditionListDTO) throws XbbException;

    /**
     * 市场活动关联销售线索， 获取流转条件
     * @param conditionListDTO
     * @return
     * @throws XbbException
     */
    ConditionListVO relationClueList(RelationClueConditionListDTO conditionListDTO) throws XbbException;

    /**
     * 根据条件进行公式校验
     * @param jsonObject
     * @param condition
     * @return
     * @throws XbbException
     */
    Object conditionValidate(JSONObject jsonObject, String condition) throws XbbException;
}
